<template >
    <div>
   <el-bread></el-bread>
       <el-row>
      <el-button type="primary" plain @click="add">添加</el-button>
    </el-row>
    <list @edit="edit"></list>
    <dia :isShow="isShow" :isAdd="isAdd" @cancel="cancel" ref="bj"></dia>
    </div>
</template>
<script setup lang="ts">
import dia from './dialog.vue'
import list from './list.vue'
import {ref} from 'vue'
let bj=ref()
let edit=(e:any)=>{
  isShow.value=true
  isAdd.value=false
bj.value.lookup(e)
}
let isShow=ref(false)
let isAdd=ref(true)
let add=()=>{
isShow.value=true
}
let cancel=()=>{
  isShow.value=false
}
</script>

<style scoped>
    .el-button {
  margin-top: 20px;
  margin-bottom: 20px;
}
</style>